﻿using System.Windows.Forms;
using Sedge.Core.Globalization;
using Sedge.UI.Controller;
using Sedge.UI.ViewModel;

namespace Sedge.UI.View
{
	public partial class GeneralizedErrorView : UserControl, ITransferable
	{
		private readonly GeneralizedErrorViewModel _viewModel;

		public GeneralizedErrorView()
		{
			InitializeComponent();
		}

		public GeneralizedErrorView(GeneralizedErrorViewModel viewModel)
			: this()
		{
			_viewModel = viewModel;
			SetupWindow();
		}

		private void SetupWindow()
		{
			labelDescription.Text = Locale.Strings.DetailsDescription;
		}

		public void TransferData()
		{
			_viewModel.StoreData(textDescription.Lines);
		}
	}
}
